package com.wmm.renwu1;

public class SendFactoryTest {

    public static void main(String[] args) {

        //优点：扩展性和可维护性更强  尤其是在创建大量对象的前提下
        //缺点：代码复杂，可读性略差
        SendFactory sendFactory = new SendFactory();

        Sender sender = sendFactory.produce("mail");
        sender.send();

        System.out.println("--------------------------------------");
        //优点：代码简单，可读性强
        //缺点：扩展性和可维护性略差
        Sender sender1 = new MaliSender();
        sender1.send();
    }
}
